<template>
  <Header>
    <div slot="left" class="header-left" @click.stop="back"></div>
    <p slot="center" class="header-title">评论({{comments.total}})</p>
    <div slot="right" class="header-right"></div>
  </Header>
</template>

<script>
import { mapActions, mapGetters } from 'vuex'
import Header from '../Header.vue'
export default {
  name: 'commentsHeader',
  methods: {
    ...mapActions([
      'setCommentsList',
      'setIsCommentsList'
    ]),
    back () {
      this.setIsCommentsList(false)
    }
  },
  components: {
    Header
  },
  mounted () {
    // this.setCommentsList()
  },
  computed: {
    ...mapGetters(['comments', 'isComments'])
  }
}
</script>

<style scoped lang='scss'>
@import "../../assets/css/variable";
@import "../../assets/css/mixin";
  .header-left {
    @include bg_img("../../assets/images/back");
  }
  .header-right {
    @include bg_img("../../assets/images/more");
  }
  .header-title {
    text-align: center;
    line-height: 100px;
    color: white;
    font-size: 36px;
    @include no-wrap();
    &.active{
      position: absolute;
      left: 90px;
    }
  }
</style>
